﻿@model IQueryable<Model.orders>
    <link href="~/Content/css/ConfirmReceive.css" rel="stylesheet" />
    <script>
        $('.ac').click(function () {
            _this = $(this)
            $.ajax({
                url: '../Confirm',
                type: 'post',
                data: {
                    orderid: $(this).attr('id'),
                },
                success: function (data) {
                    alert('收货成功');
                    _this.parent().parent().parent().remove();
                }
            });
        })
    </script>

    <link href="~/Content/css/MyOrders.css" rel="stylesheet" />
    <ul class="order-title order-b">
        <li>订单编号</li>
        <li>商品数量</li>
        <li>总价</li>
        <li>状态</li>
        <li>操作</li>
    </ul>
    @if (Model.Count() >= 0)
    {
        foreach (var item in Model)
        {
            <div class="orderitem">
                <ul class="order-b">
                    <li>@item.ID</li>
                    <li>@item.goodNum</li>
                    <li>@item.sumPrice</li>
                    <li>已发货</li>
                    <li><a class="ac" id="@item.ID">确认收货</a></li>
                </ul>
            </div>
        }
    }
